package com.share.tdo;

import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

@Data
public class UserLoginTdo {
    private Long id;
    @Pattern(regexp = "^[a-zA-Z0-9_-]{3,16}$",message = "用户名必须为3-16位的字母、数字、下划线或横线组成")
    private String username;
    @Pattern(regexp = "^[a-zA-Z0-9_-]{6,16}$",message = "密码必须为6-16位的字母、数字、下划线或横线组成")
    private String password;
    @NotBlank(message = "验证码不能为空")
    private String code;
}
